package com.ruoyi.system.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.system.domain.Area;
import com.ruoyi.system.mapper.AreaMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.BussinessDeptMapper;
import com.ruoyi.system.domain.BussinessDept;
import com.ruoyi.system.service.IBussinessDeptService;

/**
 * 事业部Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-07-18
 */
@Service
public class BussinessDeptServiceImpl extends ServiceImpl<BussinessDeptMapper, BussinessDept> implements IBussinessDeptService
{
    @Autowired
    private BussinessDeptMapper bussinessDeptMapper;

    /**
     * 查询事业部
     * 
     * @param id 事业部主键
     * @return 事业部
     */
    @Override
    public BussinessDept selectBussinessDeptById(Long id)
    {
        return bussinessDeptMapper.selectBussinessDeptById(id);
    }

    /**
     * 查询事业部列表
     * 
     * @param bussinessDept 事业部
     * @return 事业部
     */
    @Override
    public List<BussinessDept> selectBussinessDeptList(BussinessDept bussinessDept)
    {
        return bussinessDeptMapper.selectBussinessDeptList(bussinessDept);
    }

    /**
     * 新增事业部
     * 
     * @param bussinessDept 事业部
     * @return 结果
     */
    @Override
    public int insertBussinessDept(BussinessDept bussinessDept)
    {
        return bussinessDeptMapper.insertBussinessDept(bussinessDept);
    }

    /**
     * 修改事业部
     * 
     * @param bussinessDept 事业部
     * @return 结果
     */
    @Override
    public int updateBussinessDept(BussinessDept bussinessDept)
    {
        return bussinessDeptMapper.updateBussinessDept(bussinessDept);
    }

    /**
     * 批量删除事业部
     * 
     * @param ids 需要删除的事业部主键
     * @return 结果
     */
    @Override
    public int deleteBussinessDeptByIds(Long[] ids)
    {
        return bussinessDeptMapper.deleteBussinessDeptByIds(ids);
    }

    /**
     * 删除事业部信息
     * 
     * @param id 事业部主键
     * @return 结果
     */
    @Override
    public int deleteBussinessDeptById(Long id)
    {
        return bussinessDeptMapper.deleteBussinessDeptById(id);
    }
}
